Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom withdrawal transaction fee options on Send funds (BTC) #5312

Merged
merged 4 commits into from
Apr 20, 2021

Conversation

BtcContributor
Copy link
Contributor

@BtcContributor BtcContributor commented Mar 15, 2021

Fixes #5298

Now when you withdraw BTC funds you will see this:
bisq_funds

Note that I removed the same option from Settings as it is not useful anymore to me.
I think it would be great to compact even more the General Preferences but I am not sure how to do that.
bisq_settings

Issue #5304 will be fixed once this will be approved. (@wallclockbuilder is now taking care of that)

@wallclockbuilder
Copy link
Contributor

@BtcContributor Please ask me before submitting PRs for my issues. We are duplicating work.

@BtcContributor
Copy link
Contributor Author

@wallclockbuilder Sorry but I did not understand that you were working on a fix.
Usually who opens issues does not automatically fix them unless he claims them as you already did on other issues that have been explicitly assigned to you.
Anyway, sorry about that.

Please test it and let me know if you have some feedback.

@wallclockbuilder
Copy link
Contributor

Whoever opens the issue is by default responsible for implementation unless it has been assigned to someone else. No one is allowed to presume someone else will do the legwork to make their issue fixed.

This has not been assigned to anyone so by default I, the issue author, is responsible for the implementation.

Copy link
Contributor

@wallclockbuilder wallclockbuilder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add tests so we know its working and also get notified if something breaks this in the future.

@@ -221,6 +228,52 @@ public void initialize() {
withdrawMemoTextField = addTopLabelInputTextField(gridPane, ++rowIndex,
Res.get("funds.withdrawal.memoLabel", Res.getBaseCurrencyCode())).second;

Tuple3<Label, InputTextField, ToggleButton> customFeeTuple = addTopLabelInputTextFieldSlideToggleButton(gridPane, ++rowIndex,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're reorganising 40 lines of code(more than 7lines i.e. readable). Where are the unit tests and/or end-to-end tests for this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That way we know it works all the time, and we also know when it gets accidentally broken by some other feature.

Copy link
Contributor Author

@BtcContributor BtcContributor Mar 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am just reusing most of the code that was already written for Settings.
Unit tests were not available and I would prefer that someone more experienced than me could take that, if needed.

@ripcurlx
Copy link
Contributor

Whoever opens the issue is by default responsible for implementation unless it has been assigned to someone else. No one is allowed to presume someone else will do the legwork to make their issue fixed.

This has not been assigned to anyone so by default I, the issue author, is responsible for the implementation.

This isn't the default behavior how this worked so far. If someone is interested in working on an issue within the Bisq repository, she should do so by posting a comment there, even it is their own issue (actually it is the rare case, that the same person who created an issue also fixed it in the past). As soon as she is assigned, everyone knows who is working on this issue. Of course everyone can work as she pleases, but it is advised to get feedback if an issue is within the current priorities and has a high chance to get compensated by the DAO before start working on it.

@wallclockbuilder
Copy link
Contributor

@ripcurlx Please assign the issue related to this PR to @BtcContributor. I'll express interest in my issues that I want to submit a PR for.

Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of moving settings closer to where they're used, but I don't think it's good to remove the choice of fee for BSQ transactions.

Comment on lines 127 to 126
private InputTextField transactionFeeInputTextField, ignoreTradersListInputTextField, ignoreDustThresholdInputTextField,
private InputTextField ignoreTradersListInputTextField, ignoreDustThresholdInputTextField,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this field means you cannot set a manual fee for BSQ transactions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right @sqrrm. I did that as there is this issue #5304 that is similarly taking care of BSQ and that would be next to the merge of this one. However I could restore that line as you said if you think it is better that way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is not sure how quickly #5304 will be implemented I think it would be good to leave this duplication for now and remove it with the refactoring for BSQ. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with you. Just pushed this change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You just restored the reference for the InputTextField, but still removed the creation and functionality of it in Preferences. What I meant was to restore the functionality as it was before, but extract the UI element creation and most of it's functionality to FormBuilder and GUIUtil to prevent unnecessary duplication. Afterwards most of it can be re-used or adapted for the BSQ custom fee setting as well and removed from Preferences completely.

Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NACK - Please see my comment: #5312 (comment)

@BtcContributor
Copy link
Contributor Author

BtcContributor commented Apr 19, 2021

I restored the functionality in Settings and just stated more explicitly that now the option in Settings is for BSQ, as for Btc will be used the new one in Funds -> Send funds instead.

As regard the repackage for avoiding duplicates, I talked to @jmacxx and he would do that after this PR is merged as honestly I am not sure to be able to do that properly.

Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@ripcurlx ripcurlx added this to the v1.6.3 milestone Apr 20, 2021
@ripcurlx ripcurlx merged commit fbd7c9f into bisq-network:master Apr 20, 2021
@BtcContributor BtcContributor deleted the sendcustomfee branch April 20, 2021 08:36
@mjtic12
Copy link

mjtic12 commented May 9, 2021

@BtcContributor @wallclockbuilder
Just had a strange behaviour on using this feature.
I entered 10 sat/vb as custom value for the transaction fee.
But when I checked my transaction in mempool, it displayed 47,1 stat/vb.

If i remember right, it could be that, in the summary the calculated amount for the complete transaction was that one with 47sats v/b. but i did not realised it, that the amount was to high.

@BtcContributor
Copy link
Contributor Author

@BtcContributor @wallclockbuilder
Just had a strange behaviour on using this feature.
I entered 10 sat/vb as custom value for the transaction fee.
But when I checked my transaction in mempool, it displayed 47,1 stat/vb.

If i remember right, it could be that, in the summary the calculated amount for the complete transaction was that one with 47sats v/b. but i did not realised it, that the amount was to high.

Hi, could you please open a separate Github issue detailing each step, while attaching logs and screenshot, please?

I am in particular interested in this: "If i remember right, it could be that, in the summary the calculated amount for the complete transaction was that one with 47sats v/b. but i did not realised it, that the amount was to high."

So a screenshot of this should be useful.

Thanks!

@mjtic12
Copy link

mjtic12 commented May 16, 2021

Sorry, unfortunately I don't took screenshots during the process. But today there was another user with the same problem (see support-channel) and he did screens. Maybe he can provide it.

@BtcContributor
Copy link
Contributor Author

BtcContributor commented May 17, 2021

Sorry, unfortunately I don't took screenshots during the process. But today there was another user with the same problem (see support-channel) and he did screens. Maybe he can provide it.

I just checked that on Mainnet and it seems to work as expected.

I am waiting for some more details by you and keyburner to help me reproduce the bug.

Did you maybe use Use custom inputs when sending funds? See this, maybe it could be related: #5483. This will ship soon on v1.6.5.

Please always mention me when you want my attention, while opening a new Github issue and not commenting on an already merged PR. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unhide custom mining fee option(from settings-page to send-bitcoin-page)
5 participants